<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="common/meta :: meta"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

  <div class="row">
    <div class="col-sm-12">
      <div class="ibox float-e-margins">
        <div class="ibox-content">
          <form id="ec" th:action="@{/hospital/save}" method="post" class="form-horizontal">

            <div class="form-group">
              <label class="col-sm-2 control-label">JSON数据：</label>
              <div class="col-sm-10">
                <textarea name="data" id="data" class="form-control" style="width:100%;height: 220px;"></textarea>
              </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="form-group">
              <div class="col-sm-4 col-sm-offset-2">
                <button class="btn btn-primary" type="submit">保存内容</button>
                <button class="btn btn-white" type="button" onclick="javascript:opt.closeWin();" value="取消">取消</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
<script type="text/javascript">
  $(function(){
    $('#ec').validate({
      rules:{
        name:"required"
      },
      messages:{
        name:"必须输入"
      },
      submitHandler: function(form) {
        opt.load();
        $(form).find(":submit").attr("disabled", true).text("正在提交...");
        form.submit();
      }
    });
  });
</script>
